#include <iostream>
#include <string>
#include <map>
#include <functional>
#include <memory>
#include "FileFactory.h"
#include "IOC.h"


int main()
{
    IFileFactory* lpWordFile = new CWordFactory();
    lpWordFile->Create("abc");

    IFileFactory* lpTxtFile = new CTxtFactory();
    lpTxtFile->Create("abc");

    IocContainer<ICar> CarIoc;
    CarIoc.RegisterCreator<CBus>("bus");
    CarIoc.RegisterCreator<CTrack>("track");

    std::shared_ptr<ICar> lpBus = CarIoc.GetObjectPtr("bus");
    lpBus->Test();
    std::shared_ptr<ICar> lpTrack = CarIoc.GetObjectPtr("track");
    lpTrack->Test();

    return 0;
}